<?php
/**
 * @var \Ke\Web\Context          $this
 * @var \Ke\Web\Http             $http
 * @var \Ke\Web\Web              $web
 * @var string                   $content
 * @var \Ke\Utils\DocMen\DocHtml $html
 */

$currentName = $this->doc->getTitle();
?>
<div class="ui inverted menu">
	<div class="ui container">
		<a class="head item" href="<?php print $web->controllerLink(); ?>"><span
				class="logo">Ke\DocMen - <?php print $currentName; ?></span></a>
		<?php if ($this->doc->isGenerable()) { ?>
			<a class="item" href="<?php print $web->controllerLink('generate') ?>" data-ajax="1">Generate</a>
		<?php } ?>
		<?php if ($this->doc->isWithWiki()) { ?>
			<a class="item" href="<?php print $web->controllerLink('wiki') ?>">Wiki</a>
		<?php } ?>
		<div class="ui simple dropdown item">
			More <i class="dropdown icon"></i>
			<div class="menu">
				<?php
				foreach (\Ke\Utils\DocMen\DocMen::getAllInstances() as $name => $docMen) {
					if ($name !== $currentName)
						print $html->link($name, $web->uri($name), 'item');
					else
						print $html->tag('span', "<strong>{$name}</strong>", 'item');
				}
				?>
			</div>
		</div>
	</div>
</div>

